package com.jian.java.controller;

import com.jian.java.Inter.MyInter;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author Jiange
 * @create 2021-04-29-13:14
 */
@Configuration
public class InterConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //  /**会拦截样式
        registry.addInterceptor(new MyInter()).addPathPatterns("/**").excludePathPatterns("/","/test");
    }
}
